package com.jie.component.exception.base;

import com.jie.component.exception.enums.AuthenticationError;
import lombok.Getter;

/**
 * @author jie
 * @version 1.0 2025-02-16
 */
@Getter
public class AuthenticationException extends BaseException {

    private final Integer code;

    private final String msg;

    public AuthenticationException(String msg, Integer code) {
        this.msg = msg;
        this.code = code;
    }

    public AuthenticationException(AuthenticationError authenticationError) {
        this.msg = authenticationError.getMsg();
        this.code = authenticationError.getCode();
    }
}
